﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


namespace Simplicity
{


    
    partial class ChocHelper
    {
        private void FireMusicChanges()
        {
            FirePropertyChanged("Album");
            FirePropertyChanged("Artist");
            FirePropertyChanged("ProductionYear");
            FirePropertyChanged("Duration");
           



            
        }

        private string GetDynamicProperty(string PropertyName)
        {
            try
            {
                return CurrentItem.DynamicProperties[PropertyName] as string;
            }
            catch(Exception ex)
            {
                return "";
            }
        }
        public string Duration
        {
            get
            {

                string duration = GetDynamicProperty("Duration");

                if (duration != null)
                {
                    return duration;

                }
                return "";
               
            }
            
        }
        public string Album
        {
            get
            {

                

                string album = GetDynamicProperty("Album");

                if (album != null)
                {
                    return album;

                }
                return "";
                
            }
            
        }
        public string Artist
        {
            get
            {


                string artist = GetDynamicProperty("Artist");

                if (artist != null)
                {
                    return artist;

                }
                return "";

                
            }
        }
       
        
        
        public string ProductionYear
        {
            get
            {

                string productionYear = GetDynamicProperty("ProductionYear");


                if (productionYear != null)
                {
                    return productionYear;

                }
                return "";

                
            }
        }
        
    }

}
